[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                               New procedure

  DECLARATION:  New(var P : Pointer);
                New(P, Construct)         (* create dynamic object *)

      PURPOSE:  Creates a dynamic variable and sets a pointer variable to it

         UNIT:  System

      REMARKS:  Creates a new dynamic variable on the heap and sets a pointer
                variable to to point to it.  The size of the block of memory
                allocated will correspond to the size of the variable type
                that P will point to.

                In case of insufficient memory in the heap, a run-time error
                will occur.  Refer to the HeapError function to avoid a this
                type of run-time error.

                When used to create a dynamic object, the effect of the
                extended syntax is the same as executing:

                New(P);
                P^.Construct;

See Also: GetMem Dispose
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson